package com.misty.proxy_pattern.client_dynamic;

import com.imist.proxy_pattern.client1_static.IOrderService;
import com.imist.proxy_pattern.client1_static.Order;
import com.imist.proxy_pattern.client1_static.OrderServiceImpl;

public class Client {
    public static void main(String[] args) {
        Order order = new Order();
        order.setUserId(2);

        IOrderService service = (IOrderService) new DynamicProxy(new OrderServiceImpl()).bind();

        service.saveOrder(order);
    }
}
